package com.txzt.gaea.common.enums;

public enum ProgressStatus {

    /**
     * 未完成
     */
    DOING("doing","未完成"),
    /**
     * 已完成
     */
    DONE("done","已完成"),
    /**
     * 延期
     */
    IN_DELAY("in_delay","延期"),
    /**
     * 延期完成
     */
    DELAY("delay","延期完成"),
    ;

    private final String code;

    private final String info;

    ProgressStatus(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static String getInfoByCode(String code){
        ProgressStatus[] statuses = values();
        for (ProgressStatus status:statuses){
            if (status.getCode().equals(code)) {
                return status.getInfo();
            }
        }
        return "";
    }
}
